#include "data.h"


int Data::PLAYER_LEFT = -1;
int Data::PLAYER_DOWN = -2;
int Data::PLAYER_RIGHT = -3;
int Data::PLAYER_UP = -4;

int Data::currentFloor = 0;//当前楼层
int Data::maxFloor = 26;// 最大楼层
int Data::minFloor = 0;//

int Data::gameMin = 0;
double Data::gameSec = 0;

bool Data::isHasCross = false;       // 幸运十字架
bool Data::isHasForecast = false;    // 圣光徽 L
bool Data::isHasJump = false;        // 风之罗盘 J
bool Data::isHasHammer = false;      // 星光神榔
bool Data::isHasRedStick = false;    // 炎之灵杖
bool Data::isHasGreenStick = false;  // 心之灵杖
bool Data::isHasBlueStick = false;   // 冰之灵杖

bool Data::canUserKey = true;//默认交互

//constexpr int Data::initPos[24][2];
//constexpr int Data::map[27][11][11];

const int Data::initPos[24][2] = {
    {5, 9},     // 0
    {5, 9},     // 1
    {0, 1},     // 2
    {1, 10},    // 3
    {10, 9},    // 4
    {1, 10},    // 5
    {9, 9},     // 6
    {5, 10},    // 7
    {0, 1},     // 8
    {6, 3},     // 9
    {4, 6},     // 10
    {1, 10},    // 11
    {9, 10},    // 12
    {1, 10},    // 13
    {5, 9},     // 14
    {3, 0},     // 15
    {5, 0},     // 16
    {5, 8},     // 17
    {1, 10},    // 18
    {9, 10},    // 19
    {5, 4},     // 20
    {5, 5},     // 21
    {5, 1},
    {9, 5}
};

const int Data::finpost[24][2]={
    {5, 1},     // 0
    {1, 0},     // 1
    {0, 9},     // 2
    {10, 9},    // 3
    {0, 9},     // 4
    {9, 9},     // 5
    {5, 10},    // 6
    {1, 0},     // 7
    {7, 4},     // 8
    {6, 7},     // 9
    {0, 9},     // 10
    {9, 10},    // 11
    {1, 10},    // 12
    {4, 10},    // 13
    {5, 0},     // 14
    {7, 0},     // 15
    {5, 7},     // 16
    {1, 10},    // 17
    {9, 10},    // 18
    {5, 4},     // 19
    {5, 8},     // 20
    {5, 2},      // 21
    {1, 5},
    {}

};

const int Data::map[27][11][11] =  {
    {   // 第 0 层
        {1, 20, 20, 20, 20, 13, 20, 20, 20, 20, 1},
        {1, 20, 20, 20, 20, 00, 20, 20, 20, 20, 1},
        {1, 20, 20, 20, 20, 0, 20, 20, 20, 20, 1},
        {1, 20, 20, 20, 20, 0, 20, 20, 20, 20, 1},
        {1, 20, 20, 20, 20, 0, 20, 20, 20, 20, 1},
        {1, 20, 20, 20, 20, 0, 20, 20, 20, 20, 1},
        {1, 1, 20, 20, 20, 0, 20, 20, 20, 1, 1},
        {1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
        {19, 1, 19, 1, 0, 24, 0, 1, 19, 1, 19},
        {19, 19, 19, 19, 19, 00, 19, 19, 19, 19, 19},
        {19, 19, 19, 19, 19, 0, 19, 19, 19, 19, 19}
    },
    {   // 第 1 层
        {13, 00, 6, 40, 41, 40, 0, 0, 0, 0, 0},
        {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
        {11, 0, 44, 2, 0, 1, 11, 6, 11, 1, 0},
        {6, 44, 10, 1, 0, 1, 11, 6, 11, 1, 0},
        {1, 2, 1, 1, 0, 1, 1, 1, 43, 1, 0},
        {6, 45, 0, 1, 0, 2, 63, 40, 42, 1, 0},
        {9, 0, 7, 1, 0, 1, 1, 1, 1, 1, 0},
        {1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0},
        {0, 45, 0, 1, 1, 4, 1, 1, 1, 2, 1},
        {11, 12, 6, 1, 8, 00, 0, 1, 6, 46, 7},
        {11, 34, 6, 1, 0, 14, 0, 1, 6, 6, 6}
    },
    {   // 第 2 层
        {14, 1, 0, 55, 0, 1, 10, 9, 6, 8, 1},
        {00, 1, 9, 1, 12, 1, 10, 9, 6, 7, 1},
        {0, 1, 6, 1, 6, 1, 10, 9, 6, 54, 1},
        {0, 1, 6, 1, 6, 1, 1, 1, 1, 2, 1},
        {0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 1},
        {0, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1},
        {0, 5, 0, 0, 0, 0, 1, 0, 54, 0, 1},
        {0, 1, 2, 1, 1, 3, 1, 115, 1, 115, 1},
        {0, 1, 6, 1, 12, 11, 1, 0, 1, 0, 1},
        {00, 1, 6, 1, 12, 11, 1, 0, 1, 0, 1},
        {13, 1, 10, 1, 12, 11, 1, 26, 1, 27, 1}
    },
    {   // 第 3 层
        {71, 41, 6, 1, 23, 22, 21, 1, 1, 1, 1},
        {41, 6, 0, 1, 0, 0, 0, 1, 0, 42, 0},
        {6, 44, 0, 1, 1, 2, 1, 1, 0, 1, 0},
        {1, 2, 1, 1, 0, 44, 0, 1, 6, 1, 41},
        {0, 0, 0, 1, 1, 1, 0, 1, 6, 1, 42},
        {40, 1, 0, 42, 41, 42, 0, 1, 6, 1, 41},
        {40, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0},
        {0, 0, 0, 0, 0, 1, 1, 2, 1, 1, 0},
        {1, 1, 1, 1, 42, 1, 41, 0, 41, 1, 0},
        {1, 0, 0, 0, 0, 1, 9, 42, 6, 1, 00},
        {14, 00, 1, 1, 1, 1, 10, 12, 6, 1, 13}
    },
    {   // 第 4 层
        {0, 43, 0, 1, 0, 25, 0, 1, 0, 43, 0},
        {2, 1, 2, 1, 0, 0, 0, 1, 2, 1, 2},
        {0, 1, 0, 1, 1, 115, 1, 1, 0, 1, 0},
        {0, 1, 44, 1, 48, 49, 48, 1, 44, 1, 0},
        {42, 1, 11, 1, 9, 48, 9, 1, 11, 1, 42},
        {42, 1, 11, 1, 1, 4, 1, 1, 11, 1, 42},
        {41, 1, 0, 1, 46, 47, 46, 1, 0, 1, 41},
        {0, 1, 0, 1, 10, 46, 10, 1, 0, 1, 0},
        {0, 1, 0, 1, 1, 3, 1, 1, 0, 1, 0},
        {00, 1, 0, 1, 6, 0, 6, 1, 0, 1, 00},
        {13, 1, 0, 43, 0, 0, 0, 43, 0, 1, 14}
    },
    {   // 第 5 层
        {36, 1, 11, 1, 12, 63, 0, 0, 63, 6, 7},
        {0, 1, 10, 1, 63, 0, 0, 0, 0, 63, 6},
        {48, 1, 0, 1, 45, 0, 1, 1, 2, 1, 1},
        {0, 2, 63, 1, 76, 45, 1, 0, 46, 45, 27},
        {48, 1, 0, 1, 1, 1, 1, 0, 0, 0, 45},
        {10, 1, 0, 0, 0, 42, 44, 0, 0, 0, 0},
        {9, 1, 1, 43, 1, 1, 1, 1, 0, 0, 0},
        {0, 26, 1, 43, 1, 0, 0, 0, 46, 47, 0},
        {1, 1, 1, 42, 1, 2, 1, 3, 1, 2, 1},
        {00, 0, 1, 0, 1, 42, 1, 9, 2, 00, 1},
        {14, 0, 42, 0, 0, 0, 1, 6, 1, 13, 1}
    },
    {   // 第 6 层
        {30, 56, 1, 9, 1, 6, 51, 39, 1, 12, 12},
        {56, 6, 1, 10, 1, 0, 6, 51, 1, 65, 12},
        {6, 49, 3, 0, 3, 49, 0, 6, 1, 0, 65},
        {0, 0, 1, 47, 1, 0, 0, 0, 1, 52, 0},
        {1, 1, 1, 4, 1, 1, 1, 1, 1, 2, 1},
        {0, 0, 64, 0, 6, 6, 6, 0, 64, 0, 0},
        {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
        {0, 1, 48, 2, 48, 0, 0, 0, 0, 0, 1},
        {0, 1, 2, 1, 2, 1, 1, 1, 1, 3, 1},
        {0, 1, 48, 1, 0, 0, 1, 1, 0, 00, 1},
        {0, 0, 0, 1, 13, 00, 2, 2, 0, 14, 1}
    },
    {   // 第 7 层
        {13, 00, 0, 0, 0, 0, 0, 0, 1, 1, 1},
        {1, 1, 0, 49, 1, 3, 1, 56, 0, 1, 1},
        {1, 0, 49, 9, 1, 50, 1, 10, 56, 0, 1},
        {0, 0, 1, 1, 1, 15, 1, 1, 1, 0, 0},
        {0, 0, 3, 50, 115, 32, 15, 50, 3, 0, 0},
        {0, 1, 1, 1, 1, 15, 1, 1, 1, 1, 0},
        {0, 1, 11, 10, 1, 50, 1, 9, 11, 1, 0},
        {0, 1, 6, 11, 1, 3, 1, 11, 6, 1, 0},
        {0, 1, 1, 7, 7, 12, 7, 7, 1, 1, 0},
        {0, 0, 1, 1, 1, 4, 1, 1, 1, 0, 0},
        {1, 0, 0, 2, 14, 00, 0, 2, 0, 0, 1}
    },
    {   // 第 8 层
        {14, 1, 0, 0, 0, 0, 1, 0, 6, 56, 0},
        {00, 1, 0, 1, 1, 2, 1, 2, 1, 1, 0},
        {0, 1, 0, 1, 0, 0, 3, 0, 0, 1, 10},
        {0, 1, 0, 1, 60, 1, 1, 1, 48, 1, 43},
        {48, 1, 0, 1, 11, 1, 13, 00, 0, 1, 43},
        {49, 1, 9, 1, 11, 1, 1, 1, 1, 1, 0},
        {48, 1, 43, 1, 0, 0, 0, 1, 0, 49, 0},
        {0, 1, 43, 1, 1, 1, 47, 1, 2, 1, 1},
        {0, 1, 0, 56, 0, 1, 56, 1, 0, 0, 0},
        {0, 1, 1, 1, 2, 1, 0, 1, 1, 1, 0},
        {0, 0, 60, 0, 0, 1, 0, 51, 50, 51, 0}
    },
    {   // 第 9 层
        {35, 6, 0, 1, 1, 1, 0, 0, 0, 1, 0},
        {6, 0, 66, 2, 0, 0, 0, 1, 0, 2, 56},
        {1, 2, 1, 1, 0, 1, 1, 1, 0, 1, 6},
        {0, 0, 0, 1, 0, 1, 00, 0, 0, 1, 6},
        {0, 0, 0, 4, 0, 1, 14, 1, 0, 1, 11},
        {1, 3, 1, 1, 0, 1, 1, 1, 0, 1, 1},
        {9, 52, 10, 1, 60, 1, 13, 1, 0, 1, 11},
        {1, 2, 1, 1, 0, 0, 00, 2, 0, 1, 6},
        {56, 11, 56, 1, 1, 3, 1, 1, 0, 1, 6},
        {7, 56, 11, 1, 65, 60, 65, 1, 0, 2, 56},
        {73, 7, 56, 2, 12, 65, 12, 1, 0, 1, 0}
    },
    {   // 第 10 层
        {0, 1, 1, 9, 66, 1, 66, 10, 1, 1, 0},
        {0, 0, 1, 1, 2, 1, 2, 1, 1, 0, 52},
        {0, 0, 0, 0, 0, 1, 0, 0, 0, 52, 12},
        {0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1},
        {48, 1, 0, 0, 6, 6, 6, 0, 0, 1, 6},
        {49, 1, 0, 1, 1, 1, 1, 2, 1, 1, 6},
        {48, 1, 0, 115, 00, 14, 1, 0, 2, 49, 0},
        {0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0},
        {0, 1, 11, 9, 10, 1, 0, 49, 0, 1, 6},
        {00, 1, 11, 9, 10, 4, 60, 1, 60, 1, 6},
        {13, 1, 11, 9, 10, 1, 7, 1, 7, 1, 11}
    },
    {   // 第 11 层
        {11, 1, 6, 1, 7, 1, 8, 1, 12, 78, 12},
        {11, 1, 6, 1, 7, 1, 8, 1, 68, 69, 68},
        {11, 1, 6, 1, 7, 1, 8, 1, 0, 68, 0},
        {2, 1, 2, 1, 2, 1, 2, 1, 1, 3, 1},
        {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
        {2, 1, 1, 3, 1, 1, 1, 3, 1, 1, 2},
        {9, 1, 0, 68, 12, 67, 12, 68, 0, 1, 10},
        {9, 1, 66, 1, 1, 1, 1, 1, 66, 1, 10},
        {9, 1, 66, 1, 23, 22, 21, 1, 66, 1, 10},
        {1, 1, 4, 1, 11, 0, 11, 1, 4, 1, 1},
        {14, 00, 0, 0, 0, 0, 0, 0, 0, 00, 13}
    },
    {   // 第 12 层
        {27, 9, 1, 0, 54, 55, 54, 0, 1, 12, 38},
        {10, 0, 1, 0, 1, 2, 1, 0, 1, 0, 12},
        {0, 0, 1, 0, 1, 55, 1, 0, 1, 0, 0},
        {0, 67, 1, 0, 1, 6, 1, 0, 1, 58, 0},
        {67, 61, 1, 0, 1, 6, 1, 0, 1, 57, 58},
        {1, 3, 1, 0, 1, 11, 1, 0, 1, 3, 1},
        {0, 0, 0, 0, 1, 11, 1, 0, 0, 0, 0},
        {1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1},
        {9, 67, 2, 68, 68, 69, 68, 68, 2, 67, 10},
        {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
        {13, 00, 0, 0, 0, 0, 0, 0, 0, 00, 14}
    },
    {   // 第 13 层
        {0, 67, 0, 0, 0, 0, 0, 1, 0, 61, 0},
        {0, 1, 1, 1, 1, 1, 2, 1, 0, 1, 0},
        {0, 1, 0, 0, 68, 0, 0, 1, 0, 1, 0},
        {12, 1, 4, 1, 1, 1, 0, 1, 0, 1, 0},
        {54, 1, 0, 0, 61, 1, 68, 1, 10, 1, 0},
        {55, 1, 0, 62, 15, 1, 69, 1, 10, 1, 0},
        {54, 1, 61, 115, 26, 1, 68, 1, 10, 1, 9},
        {0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 9},
        {0, 54, 0, 1, 0, 0, 0, 61, 0, 1, 9},
        {1, 1, 0, 1, 12, 1, 1, 1, 1, 1, 0},
        {14, 00, 0, 3, 00, 13, 1, 31, 62, 2, 0}
    },
    {   // 第 14 层
        {1, 0, 58, 36, 13, 00, 0, 0, 0, 0, 1},
        {1, 0, 12, 1, 1, 1, 1, 1, 12, 0, 1},
        {1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1},
        {1, 0, 1, 1, 1, 33, 1, 1, 1, 0, 1},
        {1, 0, 1, 1, 1, 115, 1, 1, 1, 0, 1},
        {1, 0, 11, 1, 1, 61, 1, 1, 11, 0, 1},
        {1, 0, 20, 20, 1, 62, 1, 20, 20, 0, 1},
        {1, 0, 20, 20, 1, 61, 1, 20, 20, 0, 1},
        {1, 0, 20, 20, 1, 3, 1, 20, 20, 0, 1},
        {1, 68, 69, 68, 3, 00, 3, 68, 69, 68, 1},
        {1, 1, 1, 1, 1, 14, 1, 1, 1, 1, 1}
    },
    {   // 第 15 层
        {0, 0, 0, 00, 14, 20, 13, 00, 0, 0, 0},
        {0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 0},
        {0, 20, 20, 1, 1, 1, 1, 1, 20, 20, 0},
        {0, 20, 1, 1, 26, 1, 27, 1, 1, 20, 0},
        {0, 20, 1, 1, 9, 1, 9, 1, 1, 20, 0},
        {0, 20, 1, 1, 10, 1, 10, 1, 1, 20, 0},
        {0, 20, 20, 1, 0, 1, 0, 1, 20, 20, 0},
        {0, 20, 20, 1, 2, 1, 2, 1, 20, 20, 0},
        {0, 20, 20, 20, 0, 0, 0, 20, 20, 20, 0},
        {0, 20, 20, 20, 20, 4, 20, 20, 20, 20, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    },
    {   // 第 16 层
        {20, 20, 20, 20, 20, 00, 14, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 0, 20, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 0, 20, 20, 20, 20, 20},
        {20, 20, 20, 20, 1, 4, 1, 20, 20, 20, 20},
        {20, 20, 20, 1, 26, 119, 1, 1, 20, 20, 20},
        {20, 20, 20, 1, 1, 53, 1, 1, 20, 20, 20},
        {20, 20, 20, 1, 1, 00, 1, 1, 20, 20, 20},
        {20, 20, 20, 1, 1, 13, 1, 1, 20, 20, 20},
        {20, 20, 20, 20, 1, 1, 1, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20}
    },
    {   // 第 17 层
        {20, 58, 62, 0, 0, 0, 0, 0, 0, 0, 58},
        {20, 62, 20, 20, 20, 20, 20, 20, 20, 20, 0},
        {20, 0, 20, 58, 0, 0, 0, 0, 0, 0, 58},
        {20, 0, 20, 0, 20, 20, 20, 20, 20, 20, 20},
        {20, 0, 20, 0, 20, 58, 0, 0, 0, 58, 20},
        {20, 0, 20, 58, 0, 0, 20, 20, 20, 0, 20},
        {20, 0, 20, 20, 20, 20, 20, 58, 0, 58, 20},
        {20, 62, 20, 20, 20, 14, 20, 0, 20, 20, 20},
        {20, 58, 62, 0, 70, 00, 20, 58, 0, 0, 58},
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 0},
        {13, 00, 70, 0, 0, 0, 0, 0, 0, 0, 58}
    },
    {   // 第 18 层 （测试时 增加 楼梯）
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20},
        {20, 20, 20, 20, 1, 1, 1, 20, 20, 20, 20},
        {20, 20, 20, 1, 1, 28, 1, 1, 20, 20, 20},
        {20, 20, 20, 1, 1, 115, 1, 1, 20, 20, 20},
        {20, 20, 20, 1, 1, 4, 1, 1, 20, 20, 20},
        {20, 20, 20, 20, 1, 4, 1, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20},
        {14, 00, 0, 0, 0, 0, 0, 0, 0, 00, /*0*/13}
    },
    {   // 第 19 层
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 20, 0, 20, 20, 20, 20, 20, 0, 20, 0},
        {0, 20, 0, 20, 20, 20, 20, 20, 0, 20, 0},
        {0, 20, 0, 20, 20, 13, 20, 20, 0, 20, 0},
        {0, 20, 0, 20, 20, 00, 20, 20, 0, 20, 0},
        {0, 20, 53, 20, 20, 0, 20, 20, 53, 20, 0},
        {0, 20, 115, 20, 20, 59, 20, 20, 115, 20, 0},
        {0, 20, 75, 20, 20, 129, 20, 20, 80, 20, 0},
        {0, 20, 20, 20, 20, 0, 20, 20, 20, 20, 0},
        {0, 20, 20, 20, 20, 0, 20, 20, 20, 20, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 00, 14}
    },
    {   // 第 20 层 （测试时 增加 楼梯）
        {70, 10, 50, 11, 62, 8, 62, 11, 50, 10, 70},
        {12, 20, 6, 20, 7, 20, 7, 20, 6, 20, 12},
        {20, 9, 50, 0, 58, 0, 58, 0, 50, 9, 20},
        {11, 20, 6, 20, 0, 14, 0, 20, 6, 20, 11},
        {62, 7, 58, 0, 0, 00, 0, 0, 58, 7, 62},
        {8, 20, 0, 20, 0, 20, 0, 20, 0, 20, 8},
        {62, 7, 58, 0, 0, 00, 0, 0, 58, 7, 62},
        {11, 20, 6, 20, 0, /*0*/13, 0, 20, 6, 20, 11},
        {20, 9, 50, 0, 58, 0, 58, 0, 50, 9, 20},
        {12, 20, 6, 20, 7, 20, 7, 20, 6, 20, 12},
        {70, 10, 50, 11, 62, 8, 62, 11, 50, 10, 70}
    },
    {   // 第 21 层 （测试时 增加 楼梯）
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20},
        {20, 20, 0, 0, 20, /*59*/13, 20, 0, 0, 20, 20},
        {20, 0, 0, 20, 20, 57, 20, 20, 0, 0, 20},
        {20, 0, 0, 0, 20, 57, 20, 0, 0, 0, 20},
        {20, 20, 0, 0, 0, 0, 0, 0, 0, 20, 20},
        {20, 20, 0, 0, 0, 00, 0, 0, 0, 20, 20},
        {20, 20, 20, 0, 0, 20, 0, 0, 20, 20, 20},
        {20, 20, 20, 20, 15, 14, 15, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20}
    },
    {   // 第 22 层（测试时 增加 楼梯 301 302。 —— 301 从 22 到 24 层；302 从 22 到 25 层）
        {20, 20, 20, 20, 20, 14, 20, 20, 20, 20, 20},
        {20, 20, 20, 20, 20, 00, 20, 20, 20, 20, 20},
        {20, 20, 20, 20, 0, 0, 24, 20, 20, 20, 20},
        {15, 15, 15, 20, 20, 4, 20, 20, 15, 15, 15},
        {10, 10, 15, 20, 20, 39, 20, 20, 15, 9, 9},
        {13, 10, 58, 4, 39, 00, 39, 4, 58, 9, /*13*/302},
        {10, 10, 15, 20, 20, 39, 20, 20, 15, 9, 9},
        {15, 15, 15, 20, 20, 4, 20, 20, 15, 15, 15},
        {20, 20, 20, 15, 15, 58, 15, 15, 20, 20, 20},
        {20, 20, 20, 15, 12, 12, 12, 15, 20, 20, 20},
        {20, 20, 20, 15, 12, /*13*/301, 12, 15, 20, 20, 20}
    },
    {   // 第 23 层（左）23
        {58, 0, 0, 10, 10, 10, 0, 0, 20, 0, 12},
        {0, 20, 20, 20, 20, 20, 20, 0, 3, 0, 20},
        {10, 20, 20, 57, 58, 58, 58, 0, 20, 0, 20},
        {10, 20, 20, 30, 20, 20, 20, 20, 20, 0, 20},
        {0, 57, 20, 20, 20, 20, 20, 20, 39, 0, 20},
        {20, 4, 59, 115, 202, 20, 20, 39, 3, 00, 14},
        {0, 57, 20, 20, 20, 20, 20, 20, 39, 0, 20},
        {10, 20, 20, 30, 20, 20, 20, 20, 20, 0, 20},
        {10, 20, 20, 57, 58, 58, 58, 0, 20, 0, 20},
        {0, 20, 20, 20, 20, 20, 20, 0, 3, 0, 20},
        {58, 0, 0, 10, 10, 10, 0, 0, 20, 0, 12}
    },
    {
        // 第 23 层（下）24 （测试时 楼梯 14 改为 楼梯 303。 —— 303 从 24 到 22 层）
        // 5 改为 305。从 24 到 26 层
        {12, 20, 20, 20, 20, /*14*/303, 20, 20, 20, 20, 12},
        {0, 0, 0, 0, 0, 00, 0, 0, 0, 0, 0},
        {20, 3, 20, 20, 36, 3, 36, 20, 20, 3, 20},
        {0, 0, 0, 20, 20, 36, 20, 20, 0, 0, 0},
        {0, 20, 58, 20, 20, 20, 20, 20, 58, 20, 0},
        {0, 20, 58, 20, 20, 20, 20, 20, 58, 20, 0},
        {11, 20, 58, 20, 20, /*5*/305, 20, 20, 58, 20, 11},
        {11, 20, 57, 31, 20, 115, 20, 31, 57, 20, 11},
        {11, 20, 20, 20, 20, 59, 20, 20, 20, 20, 11},
        {0, 20, 20, 20, 57, 4, 57, 20, 20, 20, 0},
        {58, 0, 12, 12, 0, 20, 0, 12, 12, 0, 58}
    },
    {   // 第 23 层（右）25 （测试时 楼梯 14 改为 楼梯 304。 —— 304 从 25 到 22 层）
        {12, 0, 20, 0, 0, 0, 9, 9, 9, 0, 58},
        {20, 0, 3, 0, 20, 20, 20, 20, 20, 20, 0},
        {20, 0, 20, 0, 58, 58, 58, 57, 20, 20, 9},
        {20, 0, 20, 20, 20, 20, 20, 30, 20, 20, 9},
        {20, 0, 39, 20, 20, 20, 20, 20, 20, 57, 0},
        {/*14*/304, 00, 3, 39, 20, 20, 203, 115, 59, 4, 20},
        {20, 0, 39, 20, 20, 20, 20, 20, 20, 57, 0},
        {20, 0, 20, 20, 20, 20, 20, 30, 20, 20, 9},
        {20, 0, 20, 0, 58, 58, 58, 57, 20, 20, 9},
        {20, 0, 3, 0, 20, 20, 20, 20, 20, 20, 0},
        {12, 0, 20, 0, 0, 0, 9, 9, 9, 0, 58}
    },
    {// 地 下 层 26 血影
     {19, 19, 19, 15, 15, 15, 15, 15, 19, 19, 19},
     {19, 19, 19, 15, 191, 192, 193, 15, 19, 19, 19},
     {19, 19, 19, 15, 194, 195, 196, 15, 19, 19, 19},
     {19, 19, 19, 15, 197, 198, 199, 15, 19, 19, 19},
     {19, 19, 19, 15, 15, 0, 15, 15, 19, 19, 19},
     {19, 12, 12, 12, 12, 57, 12, 12, 12, 12, 19},
     {19, 19, 19, 19, 19, 58, 19, 19, 19, 19, 19},
     {19, 19, 19, 30, 58, 59, 58, 30, 19, 19, 19},
     {19, 19, 19, 19, 19, 58, 19, 19, 19, 19, 19},
     {19, 19, 19, 19, 12, 57, 12, 19, 19, 19, 19},
     {19, 19, 19, 19, 19, 00, 19, 19, 19, 19, 19}
    }
};


Data* data = NULL;
Data::Data(){
    initImage();
    initMonster();
    initPlayer();
    data = this;

    qDebug()<<"数组大小"<<sizeof(map);

}


void Data::initPlayer(){

    playerImgMap.insert(PLAYER_UP,new QPixmap("img/player/up.png"));
    playerImgMap.insert(PLAYER_DOWN,new QPixmap("img/player/down.png"));
    playerImgMap.insert(PLAYER_LEFT,new QPixmap("img/player/left.png"));
    playerImgMap.insert(PLAYER_RIGHT,new QPixmap("img/player/right.png"));
    qDebug()<<"初始化玩家头像"<<&playerImgMap;
}

void Data::initMonster(){
    monsterMap.clear();
    monsterMap.insert(40, new Monster(0, 50, 20, 1, 1, 1, "绿头怪"));
    monsterMap.insert(41, new Monster(1, 70, 15, 2, 2, 2, "红头怪"));
    monsterMap.insert(42, new Monster(2, 100, 20, 5, 3, 3, "小蝙蝠"));
    monsterMap.insert(43, new Monster(3, 200, 35, 10, 5, 5, "青头怪"));
    monsterMap.insert(44, new Monster(4, 110, 25, 5, 5, 4, "骷髅人"));
    monsterMap.insert(45, new Monster(5, 150, 40, 20, 8, 6, "骷髅士兵"));
    monsterMap.insert(46, new Monster(6, 300, 75, 45, 13, 10, "兽面人"));
    monsterMap.insert(47, new Monster(7, 450, 150, 90, 22, 19, "初级卫兵"));
    monsterMap.insert(48, new Monster(8, 150, 65, 30, 10, 8, "大蝙蝠"));
    monsterMap.insert(49, new Monster(9, 550, 160, 90, 25, 20, "红蝙蝠"));
    monsterMap.insert(50, new Monster(10, 1300, 300, 150, 40, 35, "白衣武士"));
    monsterMap.insert(51, new Monster(11, 700, 250, 125, 32, 30, "怪王"));
    monsterMap.insert(52, new Monster(12, 500, 400, 260, 47, 45, "红衣法师"));
    monsterMap.insert(53, new Monster(13, 15000, 1000, 1000, 100, 100, "红衣魔王"));
    monsterMap.insert(54, new Monster(14, 850, 350, 200, 45, 40, "金甲卫士"));
    monsterMap.insert(55, new Monster(15, 900, 750, 650, 77, 70, "金甲队长"));
    monsterMap.insert(56, new Monster(16, 400, 90, 50, 15, 12, "骷髅队长"));
    monsterMap.insert(57, new Monster(17, 1500, 830, 730, 80, 70, "灵法师"));
    monsterMap.insert(58, new Monster(18, 1200, 980, 900, 88, 75, "灵武士"));
    monsterMap.insert(59, new Monster(19, 30000, 1700, 1500, 250, 220, "冥灵魔王"));
    monsterMap.insert(60, new Monster(20, 250, 120, 70, 20, 17, "麻衣法师"));
    monsterMap.insert(61, new Monster(21, 2000, 680, 590, 70, 65, "冥战士"));
    monsterMap.insert(62, new Monster(22, 2500, 900, 850, 84, 75, "冥队长"));
    monsterMap.insert(63, new Monster(23, 125, 50, 25, 10, 7, "初级法师"));
    monsterMap.insert(64, new Monster(24, 100, 200, 110, 30, 25, "高级法师"));
    monsterMap.insert(65, new Monster(25, 500, 115, 65, 15, 15, "石头怪人"));
    monsterMap.insert(66, new Monster(26, 900, 450, 330, 50, 50, "兽面战士"));
    monsterMap.insert(67, new Monster(27, 1200, 620, 520, 65, 75, "双手剑士"));
    monsterMap.insert(68, new Monster(28, 1250, 500, 400, 55, 55, "冥卫兵"));
    monsterMap.insert(69, new Monster(29, 1500, 560, 460, 60, 60, "高级卫兵"));
    monsterMap.insert(70, new Monster(30, 3100, 1150, 1050, 92, 80, "影子战士"));
    monsterMap.insert(188, new Monster(31, 99999, 5000, 4000, 0, 0, "血影"));
    monsterMap.insert(198, new Monster(32, 99999, 9999, 5000, 0, 0, "魔龙"));
}


void Data::initImage(){
    if(imagesMap0.size()>0) return;


    imagesMap0.insert(0,new QPixmap("img/map0/0.png"));
    imagesMap0.insert(1,new QPixmap("img/map0/1.png"));
    imagesMap0.insert(2,new QPixmap("img/map0/2.png"));
    imagesMap0.insert(3,new QPixmap("img/map0/3.png"));
    imagesMap0.insert(4,new QPixmap("img/map0/4.png"));
    imagesMap0.insert(5,new QPixmap("img/map0/5.png"));
    imagesMap0.insert(6,new QPixmap("img/map0/6.png"));
    imagesMap0.insert(7,new QPixmap("img/map0/7.png"));
    imagesMap0.insert(8,new QPixmap("img/map0/8.png"));
    imagesMap0.insert(9,new QPixmap("img/map0/9.png"));
    imagesMap0.insert(10,new QPixmap("img/map0/10.png"));
    imagesMap0.insert(11,new QPixmap("img/map0/11.png"));
    imagesMap0.insert(12,new QPixmap("img/map0/12.png"));
    imagesMap0.insert(13,new QPixmap("img/map0/13.png"));
    imagesMap0.insert(14,new QPixmap("img/map0/14.png"));
    imagesMap0.insert(15,new QPixmap("img/map0/15.png"));
    imagesMap0.insert(19,new QPixmap("img/map0/19.png"));
    imagesMap0.insert(20,new QPixmap("img/map0/20.png"));
    imagesMap0.insert(21,new QPixmap("img/map0/21.png"));
    imagesMap0.insert(22,new QPixmap("img/map0/22.png"));
    imagesMap0.insert(23,new QPixmap("img/map0/23.png"));
    imagesMap0.insert(24,new QPixmap("img/map0/24.png"));
    imagesMap0.insert(25,new QPixmap("img/map0/25.png"));
    imagesMap0.insert(26,new QPixmap("img/map0/26.png"));
    imagesMap0.insert(27,new QPixmap("img/map0/27.png"));
    imagesMap0.insert(28,new QPixmap("img/map0/28.png"));
    imagesMap0.insert(30,new QPixmap("img/map0/30.png"));
    imagesMap0.insert(31,new QPixmap("img/map0/31.png"));
    imagesMap0.insert(32,new QPixmap("img/map0/32.png"));
    imagesMap0.insert(33,new QPixmap("img/map0/33.png"));
    imagesMap0.insert(34,new QPixmap("img/map0/34.png"));
    imagesMap0.insert(35,new QPixmap("img/map0/35.png"));
    imagesMap0.insert(36,new QPixmap("img/map0/36.png"));
    imagesMap0.insert(38,new QPixmap("img/map0/38.png"));
    imagesMap0.insert(39,new QPixmap("img/map0/39.png"));
    imagesMap0.insert(40,new QPixmap("img/map0/40.png"));
    imagesMap0.insert(41,new QPixmap("img/map0/41.png"));
    imagesMap0.insert(42,new QPixmap("img/map0/42.png"));
    imagesMap0.insert(43,new QPixmap("img/map0/43.png"));
    imagesMap0.insert(44,new QPixmap("img/map0/44.png"));
    imagesMap0.insert(45,new QPixmap("img/map0/45.png"));
    imagesMap0.insert(46,new QPixmap("img/map0/46.png"));
    imagesMap0.insert(47,new QPixmap("img/map0/47.png"));
    imagesMap0.insert(48,new QPixmap("img/map0/48.png"));
    imagesMap0.insert(49,new QPixmap("img/map0/49.png"));
    imagesMap0.insert(50,new QPixmap("img/map0/50.png"));
    imagesMap0.insert(51,new QPixmap("img/map0/51.png"));
    imagesMap0.insert(52,new QPixmap("img/map0/52.png"));
    imagesMap0.insert(53,new QPixmap("img/map0/53.png"));
    imagesMap0.insert(54,new QPixmap("img/map0/54.png"));
    imagesMap0.insert(55,new QPixmap("img/map0/55.png"));
    imagesMap0.insert(56,new QPixmap("img/map0/56.png"));
    imagesMap0.insert(57,new QPixmap("img/map0/57.png"));
    imagesMap0.insert(58,new QPixmap("img/map0/58.png"));
    imagesMap0.insert(59,new QPixmap("img/map0/59.png"));
    imagesMap0.insert(60,new QPixmap("img/map0/60.png"));
    imagesMap0.insert(61,new QPixmap("img/map0/61.png"));
    imagesMap0.insert(62,new QPixmap("img/map0/62.png"));
    imagesMap0.insert(63,new QPixmap("img/map0/63.png"));
    imagesMap0.insert(64,new QPixmap("img/map0/64.png"));
    imagesMap0.insert(65,new QPixmap("img/map0/65.png"));
    imagesMap0.insert(66,new QPixmap("img/map0/66.png"));
    imagesMap0.insert(67,new QPixmap("img/map0/67.png"));
    imagesMap0.insert(68,new QPixmap("img/map0/68.png"));
    imagesMap0.insert(69,new QPixmap("img/map0/69.png"));
    imagesMap0.insert(70,new QPixmap("img/map0/70.png"));
    imagesMap0.insert(71,new QPixmap("img/map0/71.png"));
    imagesMap0.insert(73,new QPixmap("img/map0/73.png"));
    imagesMap0.insert(75,new QPixmap("img/map0/75.png"));
    imagesMap0.insert(76,new QPixmap("img/map0/76.png"));
    imagesMap0.insert(78,new QPixmap("img/map0/78.png"));
    imagesMap0.insert(80,new QPixmap("img/map0/80.png"));
    imagesMap0.insert(181,new QPixmap("img/map0/181.png"));
    imagesMap0.insert(182,new QPixmap("img/map0/182.png"));
    imagesMap0.insert(183,new QPixmap("img/map0/183.png"));
    imagesMap0.insert(184,new QPixmap("img/map0/184.png"));
    imagesMap0.insert(185,new QPixmap("img/map0/185.png"));
    imagesMap0.insert(186,new QPixmap("img/map0/186.png"));
    imagesMap0.insert(187,new QPixmap("img/map0/187.png"));
    imagesMap0.insert(188,new QPixmap("img/map0/188.png"));
    imagesMap0.insert(189,new QPixmap("img/map0/189.png"));
    imagesMap0.insert(191,new QPixmap("img/map0/191.png"));
    imagesMap0.insert(192,new QPixmap("img/map0/192.png"));
    imagesMap0.insert(193,new QPixmap("img/map0/193.png"));
    imagesMap0.insert(194,new QPixmap("img/map0/194.png"));
    imagesMap0.insert(195,new QPixmap("img/map0/195.png"));
    imagesMap0.insert(196,new QPixmap("img/map0/196.png"));
    imagesMap0.insert(197,new QPixmap("img/map0/197.png"));
    imagesMap0.insert(198,new QPixmap("img/map0/198.png"));
    imagesMap0.insert(199,new QPixmap("img/map0/199.png"));
    imagesMap0.insert(202,new QPixmap("img/map0/202.png"));
    imagesMap0.insert(203,new QPixmap("img/map0/203.png"));


    imagesMap0.insert(115,new QPixmap("img/map0/15.png"));
    imagesMap0.insert(119,new QPixmap("img/map0/0.png"));
    imagesMap0.insert(129,new QPixmap("img/map0/0.png"));
    imagesMap0.insert(301,new QPixmap("img/map0/13.png"));
    imagesMap0.insert(302,new QPixmap("img/map0/13.png"));
    imagesMap0.insert(303,new QPixmap("img/map0/14.png"));
    imagesMap0.insert(304,new QPixmap("img/map0/14.png"));
    imagesMap0.insert(305,new QPixmap("img/map0/5.png"));



    imagesMap1.insert(0,new QPixmap("img/map1/0.png"));
    imagesMap1.insert(1,new QPixmap("img/map1/1.png"));
    imagesMap1.insert(2,new QPixmap("img/map1/2.png"));
    imagesMap1.insert(3,new QPixmap("img/map1/3.png"));
    imagesMap1.insert(4,new QPixmap("img/map1/4.png"));
    imagesMap1.insert(5,new QPixmap("img/map1/5.png"));
    imagesMap1.insert(6,new QPixmap("img/map1/6.png"));
    imagesMap1.insert(7,new QPixmap("img/map1/7.png"));
    imagesMap1.insert(8,new QPixmap("img/map1/8.png"));
    imagesMap1.insert(9,new QPixmap("img/map1/9.png"));
    imagesMap1.insert(10,new QPixmap("img/map1/10.png"));
    imagesMap1.insert(11,new QPixmap("img/map1/11.png"));
    imagesMap1.insert(12,new QPixmap("img/map1/12.png"));
    imagesMap1.insert(13,new QPixmap("img/map1/13.png"));
    imagesMap1.insert(14,new QPixmap("img/map1/14.png"));
    imagesMap1.insert(15,new QPixmap("img/map1/15.png"));
    imagesMap1.insert(19,new QPixmap("img/map1/19.png"));
    imagesMap1.insert(20,new QPixmap("img/map1/20.png"));
    imagesMap1.insert(21,new QPixmap("img/map1/21.png"));
    imagesMap1.insert(22,new QPixmap("img/map1/22.png"));
    imagesMap1.insert(23,new QPixmap("img/map1/23.png"));
    imagesMap1.insert(24,new QPixmap("img/map1/24.png"));
    imagesMap1.insert(25,new QPixmap("img/map1/25.png"));
    imagesMap1.insert(26,new QPixmap("img/map1/26.png"));
    imagesMap1.insert(27,new QPixmap("img/map1/27.png"));
    imagesMap1.insert(28,new QPixmap("img/map1/28.png"));
    imagesMap1.insert(30,new QPixmap("img/map1/30.png"));
    imagesMap1.insert(31,new QPixmap("img/map1/31.png"));
    imagesMap1.insert(32,new QPixmap("img/map1/32.png"));
    imagesMap1.insert(33,new QPixmap("img/map1/33.png"));
    imagesMap1.insert(34,new QPixmap("img/map1/34.png"));
    imagesMap1.insert(35,new QPixmap("img/map1/35.png"));
    imagesMap1.insert(36,new QPixmap("img/map1/36.png"));
    imagesMap1.insert(38,new QPixmap("img/map1/38.png"));
    imagesMap1.insert(39,new QPixmap("img/map1/39.png"));
    imagesMap1.insert(40,new QPixmap("img/map1/40.png"));
    imagesMap1.insert(41,new QPixmap("img/map1/41.png"));
    imagesMap1.insert(42,new QPixmap("img/map1/42.png"));
    imagesMap1.insert(43,new QPixmap("img/map1/43.png"));
    imagesMap1.insert(44,new QPixmap("img/map1/44.png"));
    imagesMap1.insert(45,new QPixmap("img/map1/45.png"));
    imagesMap1.insert(46,new QPixmap("img/map1/46.png"));
    imagesMap1.insert(47,new QPixmap("img/map1/47.png"));
    imagesMap1.insert(48,new QPixmap("img/map1/48.png"));
    imagesMap1.insert(49,new QPixmap("img/map1/49.png"));
    imagesMap1.insert(50,new QPixmap("img/map1/50.png"));
    imagesMap1.insert(51,new QPixmap("img/map1/51.png"));
    imagesMap1.insert(52,new QPixmap("img/map1/52.png"));
    imagesMap1.insert(53,new QPixmap("img/map1/53.png"));
    imagesMap1.insert(54,new QPixmap("img/map1/54.png"));
    imagesMap1.insert(55,new QPixmap("img/map1/55.png"));
    imagesMap1.insert(56,new QPixmap("img/map1/56.png"));
    imagesMap1.insert(57,new QPixmap("img/map1/57.png"));
    imagesMap1.insert(58,new QPixmap("img/map1/58.png"));
    imagesMap1.insert(59,new QPixmap("img/map1/59.png"));
    imagesMap1.insert(60,new QPixmap("img/map1/60.png"));
    imagesMap1.insert(61,new QPixmap("img/map1/61.png"));
    imagesMap1.insert(62,new QPixmap("img/map1/62.png"));
    imagesMap1.insert(63,new QPixmap("img/map1/63.png"));
    imagesMap1.insert(64,new QPixmap("img/map1/64.png"));
    imagesMap1.insert(65,new QPixmap("img/map1/65.png"));
    imagesMap1.insert(66,new QPixmap("img/map1/66.png"));
    imagesMap1.insert(67,new QPixmap("img/map1/67.png"));
    imagesMap1.insert(68,new QPixmap("img/map1/68.png"));
    imagesMap1.insert(69,new QPixmap("img/map1/69.png"));
    imagesMap1.insert(70,new QPixmap("img/map1/70.png"));
    imagesMap1.insert(71,new QPixmap("img/map1/71.png"));
    imagesMap1.insert(73,new QPixmap("img/map1/73.png"));
    imagesMap1.insert(75,new QPixmap("img/map1/75.png"));
    imagesMap1.insert(76,new QPixmap("img/map1/76.png"));
    imagesMap1.insert(78,new QPixmap("img/map1/78.png"));
    imagesMap1.insert(80,new QPixmap("img/map1/80.png"));
    imagesMap1.insert(181,new QPixmap("img/map1/181.png"));
    imagesMap1.insert(182,new QPixmap("img/map1/182.png"));
    imagesMap1.insert(183,new QPixmap("img/map1/183.png"));
    imagesMap1.insert(184,new QPixmap("img/map1/184.png"));
    imagesMap1.insert(185,new QPixmap("img/map1/185.png"));
    imagesMap1.insert(186,new QPixmap("img/map1/186.png"));
    imagesMap1.insert(187,new QPixmap("img/map1/187.png"));
    imagesMap1.insert(188,new QPixmap("img/map1/188.png"));
    imagesMap1.insert(189,new QPixmap("img/map1/189.png"));
    imagesMap1.insert(191,new QPixmap("img/map1/191.png"));
    imagesMap1.insert(192,new QPixmap("img/map1/192.png"));
    imagesMap1.insert(193,new QPixmap("img/map1/193.png"));
    imagesMap1.insert(194,new QPixmap("img/map1/194.png"));
    imagesMap1.insert(195,new QPixmap("img/map1/195.png"));
    imagesMap1.insert(196,new QPixmap("img/map1/196.png"));
    imagesMap1.insert(197,new QPixmap("img/map1/197.png"));
    imagesMap1.insert(198,new QPixmap("img/map1/198.png"));
    imagesMap1.insert(199,new QPixmap("img/map1/199.png"));
    imagesMap1.insert(202,new QPixmap("img/map1/202.png"));
    imagesMap1.insert(203,new QPixmap("img/map1/203.png"));

    imagesMap1.insert(115,new QPixmap("img/map1/15.png"));
    imagesMap1.insert(119,new QPixmap("img/map1/0.png"));
    imagesMap1.insert(129,new QPixmap("img/map1/0.png"));
    imagesMap1.insert(301,new QPixmap("img/map1/13.png"));
    imagesMap1.insert(302,new QPixmap("img/map1/13.png"));
    imagesMap1.insert(303,new QPixmap("img/map1/14.png"));
    imagesMap1.insert(304,new QPixmap("img/map1/14.png"));
    imagesMap1.insert(305,new QPixmap("img/map1/5.png"));


}



